package com.xuelangyun.service;

import com.xuelangyun.dao.TypeDao;

/**
 * @Version 1.0
 * @Author:xinyan
 * @Date:2022/4/16
 * @Content:
 */
public class ConstructorService {
    // bean对象
    private TypeDao typeDao;

    // 字符串类型
    private String hosts;

    // 整型
    private Integer port;

    public ConstructorService(TypeDao typeDao, String hosts, Integer port) {
        this.typeDao = typeDao;
        this.hosts = hosts;
        this.port = port;
    }

    public ConstructorService(TypeDao typeDao) {
        this.typeDao = typeDao;
    }
    public void test(){
    System.out.println("ConstructorService......");
    typeDao.test();
    System.out.println("Host:" + hosts + ",Port:" + port);
    }
}
